//
//  MainTypesListTableViewCell.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/11.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "MainTypesListTableViewCell.h"

@implementation MainTypesListTableViewCell
{
    GLGWImageView *rigtImgV;
    GLGWLabel *leftLabel;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self hiderLine:NO];
        [self setShowPush:YES];
        [self setSepartionLineWith:lineModel_Half];
        GLGWLabel *leftLab = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        leftLab.text = @"钢材";
        [leftLab mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(14));
            make.left.equalTo(self.contentView.mas_left).offset(kHeightProportion_In_iPhoneTriploid(15));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(14));
        }];
        leftLab.numberOfLines = 0;
        leftLabel = leftLab;
        
        GLGWImageView *imgV = [[GLGWImageView alloc] initWithImageName:@"icon_xuanzhecixiang" inSuperView:self.contentView];
        [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.contentView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(22));
            make.centerY.equalTo(leftLab.mas_centerY);
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(14)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(10)));
        }];
        imgV.hidden = YES;
        rigtImgV = imgV;
    }
    return self;
}

- (void)setHidenRighImgV:(BOOL)hidenRighImgV
{
    _hidenRighImgV = hidenRighImgV;
    rigtImgV.hidden = hidenRighImgV;
//    if (hidenRighImgV == YES) {
//        [self setShowPush:YES];
//    } else {
//        [self setShowPush:NO];
//    }
}

- (void)setLeftStr:(NSString *)leftStr
{
    _leftStr = leftStr;
    leftLabel.text = leftStr;
}

@end
